package com.group3.hospital.mapper;

import com.group3.hospital.bean.Admin;
import com.group3.hospital.bean.Doctor;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author 尚硅谷
 * @create 2022/1/4
 */
public interface PasswordMapper {

    @Select("select admin_password from admin where admin_tel = ${adminTel}")
    String getPassword(long adminTel);

    @Update("update admin set admin_password = #{adminPassword} where admin_tel = #{adminTel}")
    void update(Admin admin);

    @Select("select admin_tel from admin")
    List<Long> getTel();

    @Select("select * from doctor limit 4")
    List<Doctor> fourDoctor();
}
